// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import Vuex from 'vuex'
import axios from 'axios'
import store from './vuex'
import ElementUI from 'element-ui';
import "babel-polyfill"
// 引入 ECharts 主模块
var echarts = require('echarts/lib/echarts');
// 引入图类，需要用到哪个才引入哪个~~~因为后期webpack
require('echarts/lib/chart/bar');
require('echarts/lib/chart/pie');
require("echarts/lib/chart/radar");
require("echarts/lib/chart/line");
require("echarts/lib/chart/graph");
require("echarts/lib/component/toolbox");
// 引入工具组件
require('echarts/lib/component/tooltip');
require("echarts/lib/component/legendScroll");
//支持词云
require('echarts-wordcloud');
import 'element-ui/lib/theme-chalk/index.css';
import './permiss'
Vue.config.productionTip = false

Vue.prototype.$echarts = echarts;
Vue.prototype.$axios = axios;

//改写date内置方法
Date.prototype._toDateString = function() {
        return this.getFullYear() + "-" + (this.getMonth() + 1) + "-" + this.getDate();
    };
Date.prototype._toDate0String = function() {
        return this.getFullYear() + String(this.getMonth() + 1).padStart(2,'0') + String(this.getDate()).padStart(2,'0');
    };
Date.prototype._toLocaleString = function() {
    return this.getFullYear() + "年" + (this.getMonth() + 1) + "月" + this.getDate() + "日 " + this.getHours() + ":" + this.getMinutes() + ":" + this.getSeconds();
};

Vue.use(ElementUI);
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
});



